{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Welcome to an example Binder"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This notebook uses a Python environment with a few libraries, including `dask`, all of which were specificied using a `conda` [environment.yml](../edit/environment.yml) file. To demo the environment, we'll show a simplified example of using `dask` to analyze time series data, adapted from Matthew Rocklin's excellent repo of [dask examples](https://github.com/blaze/dask-examples) — check out that repo for the full version (and many other examples)."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Setup plotting"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Turn on a global progress bar"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from dask.diagnostics import ProgressBar"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "progress_bar = ProgressBar()\n",
    "progress_bar.register()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Generate fake data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import dask.dataframe as dd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "df = dd.demo.make_timeseries(start='2000', end='2015', dtypes={'A': float, 'B': int},\n",
    "                             freq='5s', partition_freq='3M', seed=1234)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Compute and plot a cumulative sum"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[########################################] | 100% Completed | 16.5s\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAD1CAYAAAC2nUlHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXecFeXV+L8HBDSCdJaOdEERFSN214ZYAibGhjGoxFje\n2PLqG03iL/omIWLyxhIjGnuJRGxRMaBYFgRBbCi9iLSlSlcBWTi/P86Mc3f37u7dvXdv2Xu+n8/9\nzMwzz8ycLfc585xznnNEVXEcx3Hyk3qZFsBxHMfJHK4EHMdx8hhXAo7jOHmMKwHHcZw8xpWA4zhO\nHuNKwHEcJ49JWgmISDMReV5E5onIXBEZKCItRGSiiCwUkTdEpFlM/1tEZJGIzBeRQTHtA0RkVnDu\nnmTlchzHcaomFTOBe4D/qGof4GBgPnAzMFFVewFvBceISF/gfKAvMBi4X0QkuM9oYISq9gR6isjg\nFMjmOI7jVEJSSkBEmgLHqeqjAKpaoqpbgCHAE0G3J4Czg/2hwBhV3aWqS4HFwEARaQc0UdUZQb8n\nY65xHMdxaolkZwJdgfUi8piIfCwiD4nIvkCBqq4N+qwFCoL99sDKmOtXAh3itBcH7Y7jOE4tkqwS\n2As4DLhfVQ8DviYw/YSo5aXw3BSO4zhZyF5JXr8SWKmqHwTHzwO3AGtEpK2qrglMPeuC88VAp5jr\nOwb3KA72Y9uLyz5MRFyZOI7j1ABVlXjtSc0EVHUNsEJEegVNpwBzgFeB4UHbcODfwf4rwAUi0lBE\nugI9gRnBfbYGkUUCXBxzTdlnpvTzu9/9LuX3rO1PLsqcq3K7zC53XZC5MpKdCQBcA/xTRBoCnwOX\nAvWBsSIyAlgKnBcM4HNFZCwwFygBrtZIwquBx4F9sGijCSmQzXEcx6mEpJWAqn4KfD/OqVMq6D8S\nGBmn/SOgX7LyOI7jOImT9yuGCwsLMy1CtclFmSE35XaZ00cuyp2LMpdFqrIXZRMiorkkr+M4TjYg\nImhtOIYdx3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7QFnge6Bm3NgQ4uc92WOxdlzlW5qynzczEy\nHw8cnyO/66yRO92frJ0JYGaR5yTK1TEF6Kyqj2Ex0deqafGOwC5V/QJAVTepanFmRM5JmSE35c5F\nmSE35a6OzCUxMk9W1cmZERnIXbnTStYqAVXdruaxDxeZnAp8GexfBvQRkdcwm+nHmZCxLLkoM+Sm\n3LkoM+Sm3LkoM+Su3Okm69NGiCWaUixh1jVqS+V7YMVnDgSWqi32yRpyUWbITblzUWbITblzUWbI\nXbnTRdbOBELUUj80wDT4wYHmvhXYrapTsvGPl4syQ27KnYsyQ27KnYsyQ+7KnTYy7ZRI5AMcha3S\nm4Ilzsq4THVR5lyVOxdlzlW5c1HmXJY7HZ+sNwcBiEhHLGf6X9RW9WU9uSgz5KbcuSgz5KbcuSgz\n5K7c6SAnlIDjOI5TO2S9T8BxHMepPVwJOI7j5DGuBBzHcfIYVwKO4zh5jCsBx3GcPMaVgOM4Th7j\nSsBxHCeP+f9c2jF5wFgVPgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f3e3831f390>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df.A.cumsum().resample('1w').mean().compute().plot();"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
